package tech.aistar.corejava.day11;

import java.util.HashSet;
import java.util.Set;

/**
 * Created by 李雨昂 on 2019/7/29.
 */
public class ArraySetDemo {
    public static void main(String[] args) {
        int[] arr = {1,2,3,1,2,4,2};

        Set<Integer>  set = new HashSet<>();
        for (int i = 0; i < arr.length; i++) {
            set.add(arr[i]);
        }
        System.out.println(set);
    }
}
